Gre+IPsec实验 | 您所在的位置:网站首页 › cod16 匹配 › Gre+IPsec实验 |
IPsec理论详见 IPsec概述 配置IPsec静态点对点模式,拓扑如下: R1 interface Ethernet0/0 ip address 12.1.1.1 255.255.255.252R2 interface Ethernet0/0 ip address 12.1.1.2 255.255.255.252 interface Ethernet0/1 ip address 23.1.1.2 255.255.255.252R3 interface Ethernet0/0 ip address 23.1.1.1 255.255.255.252 路由协议配置静态或者其他协议让R1和R3学到对方的路由,互相通信。 此处使用静态路由: R1 ip route 23.1.1.0 255.255.255.252 12.1.1.2R3 ip route 12.1.1.0 255.255.255.252 23.1.1.2 GRE隧道建立R1到R2之间的GRE隧道 R1 interface Tunnel0 ip address 13.1.1.1 255.255.255.252 tunnel source 12.1.1.1 # 源地址 tunnel destination 23.1.1.1 # 目标地址R2 interface Tunnel0 ip address 13.1.1.2 255.255.255.252 tunnel source 23.1.1.1 tunnel destination 12.1.1.1建立完成GRE隧道能够正常通信 以R1为例 阶段一配置阶段一的安全参数 crypto isakmp policy 1 encr 3des #使用3des加密 hash md5 # 使用MD5散列函数校验 authentication pre-share # 采用与共享密身份认证 group 2 # DH的组号 crypto isakmp key ccie address 23.1.1.1 # 配置预共享认证的对等体及密钥 阶段二配置转换集,使用安全协议及模式对数据进行封装 crypto ipsec transform-set SET esp-3des esp-md5-hmac抓取感兴趣流 access-list 110 permit ip host 12.1.1.1 host 23.1.1.1配置策略MAP,调用以上参数 crypto map MAP 10 ipsec-isakmp # 10表示的是序号 set peer 23.1.1.1 # 设置对等体 set transform-set SET # 调用转换集 match address 110 # 匹配感兴趣流在接口下调用IPsec: interface Ethernet0/0 ip address 12.1.1.1 255.255.255.252 crypto map MAP # 调用IPsec endR3 R3#show run | se cry crypto isakmp policy 1 encr 3des hash md5 authentication pre-share group 2 crypto isakmp key ccie address 12.1.1.1 crypto ipsec transform-set SET esp-3des esp-md5-hmac mode tunnel crypto map MAP 10 ipsec-isakmp set peer 12.1.1.1 set transform-set SET match address 110 crypto map MAP配置全部完成后查看IPsec状态 |
CopyRight 2018-2019 实验室设备网 版权所有 |